; ModuleID = 'assign.c'
source_filename = "assign.c";target部分直接照抄，修改一些文件名
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

; Function Attrs: nofree norecurse nounwind uwtable 这句话照抄，下面定义的语句是定义main函数，参数照抄
define dso_local i32 @main() local_unnamed_addr #0 {
    ;创建a[10]
  %1= alloca [10 x i32],align 4
;把10放入a[0]
  %2=getelementptr [10 x i32], [10 x i32]* %1, i32 0, i32 0
  store i32 10,i32* %2,align 4
  ;计算a[1]的值，拿一个变量暂存
  %3=load i32,i32* %2,align 4
  %4=add nsw i32 %3, %3
  ;把结果放入a[1]
  %5=getelementptr [10 x i32], [10 x i32]* %1, i32 0, i32 1
  store i32 %4,i32* %5
  ;返回a[1]
  %6=load i32,i32* %5
  ret i32 %6
}
